package org.ricks.log;

/**
 * @author chenwei
 * @Title:
 * @Package
 * @Description:
 * @date 2021/1/2917:13
 */
interface Segment {

    /**
     * Gets the static text if available.
     *
     * @return Static text or {@code null}
     */
    String getStaticText();

    /**
     * Verifies whether a token matches with the segment.
     *
     * @param token
     *            Token to match
     * @return {@code true} if token matches with the segment, {@code false} if not
     */
    boolean validateToken(String token);

    /**
     * Generates a new token.
     *
     * @param prefix
     *            Already generated path
     * @param timestamp
     *            Timestamp for date and time representations
     * @return Generated token
     */
    String createToken(String prefix, Timestamp timestamp);

}

